<script setup lang="ts">
import { ref } from 'vue'
import { useRouter } from 'vue-router';
const Window:any = window;
const route = useRouter()
const clickOk = async ()=>{
    console.log(value)
    if(value.value < 5)
    {
        //@ts-ignore
        ElMessage.error('很抱歉，您只能评价满分')
    }
    else
    {
        await Window.app.commit()
        route.back()
    }
}
const value = ref(0)
</script>
<template>
    <div class="title">
        <el-text class="mx-1">请您对本次服务进行评价</el-text>
    </div>
    <div class="content" style="margin-top: 80px;">
        <el-rate v-model="value" size="large"/>
    </div>
    <div class="content">
        <el-button @click="clickOk" type="success">确定</el-button>
    </div>
    
</template>
<style scoped>
.title
{
    margin-top: 20px;
    text-align: center;
}
.title .mx-1
{
    font-size: 30px;
    font-weight: 700;
}
.content
{
    text-align: center;
}
</style>